API Documentation
Public Member Functions | List of all members
nkLog::Logger Class Referenceabstract

An interface to make all logging capabilities central. More...

Inheritance diagram for nkLog::Logger:
nkLog::ConsoleLogger nkLog::FileLogger

Public Member Functions

 Logger ()
 
virtual ~Logger ()
 
virtual void log (const StringView &message, const StringView &className)=0
 

Detailed Description

An interface to make all logging capabilities central.

A client will inherit from this class and override the log method to output messages wherever is needed. This class is the base of all loggers within the library. Using it, it is possible to reroute all messages logged by the engine.

Constructor & Destructor Documentation

◆ Logger()

nkLog::Logger::Logger ( )

Constructor.

◆ ~Logger()

virtual nkLog::Logger::~Logger ( )
virtual

Destructor.

Member Function Documentation

◆ log()

virtual void nkLog::Logger::log ( const StringView message,
const StringView className 
)
pure virtual

The method called when a message has been logged.

Parameters
messageThe message to log.
classNameA bonus information to help giving context for the message that has been logged. Typically, it will be the class name (a message from Texture unable to load for instance).

Implemented in nkLog::FileLogger, and nkLog::ConsoleLogger.


The documentation for this class was generated from the following file: